A number of medical devices exist which are purely mechanical, for example injection pens. Other devices already contain electronic parts. However, electronic parts also become part of devices which are so far purely mechanical, for example for allowing easier use, controlling the functions of the device and thus increasing safety, storing information on the usage of the device, and so on.